const mysql = require('mysql')
let config = {
    host: '127.0.0.1',
    user: 'root',
    password: 'root',
    database:'cloud'
} 
const pool = mysql.createPool(config)
pool.getConnection((err) => {
    if (err) {
        console.log('数据库连接失败')
        
    } else { 
        console.log('数据库连接成功')
    }
 })
module.exports = {
    pool,
    escape:mysql.escape 
}